package com.atguigu.eduservice.service;

import com.atguigu.eduservice.entity.EduCourse;
import com.atguigu.eduservice.entity.frontvo.CourseFrontVo;
import com.atguigu.eduservice.entity.frontvo.CourseWebVo;
import com.atguigu.eduservice.entity.vo.CourseInfoVo;
import com.atguigu.eduservice.entity.vo.CoursePublishVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author testjava
 * @since 2023-03-05
 */
public interface EduCourseService extends IService<EduCourse> {
    //返回课程id，前端路径需要
    public String addCourseInfo(CourseInfoVo courseInfoVo);

    //根据课程id查询，实现信息回显
    public CourseInfoVo getCourseInfoByID(String courseId);

    //修改
    public boolean updateCourseInfo(CourseInfoVo courseInfoVo);

    //确认最终课程发布信息
    public CoursePublishVo getCoursePublishVo(String courseId);

    //查询所有课程，并且排序
    public List<EduCourse> getCourseList();

    //分页查询
    public Map<String,Object> pageList(long current, long limit);

    //条件查询
    public Map<String,Object> pageConditionList(long current, long limit,EduCourse eduCourse);

    //删除课程
    public boolean removeCourse(String courseId);

    //用户页面banner index首页
    public List<EduCourse> indexCourseInfo();

    //讲师id查询课程
    List<EduCourse> selectByTeacherId(String teacherId);

    //1 条件查询带分页查询课程前台
    Map<String, Object> getCourseFrontList(Page<EduCourse> pageCourse, CourseFrontVo courseFrontVo);

    //根据课程id，编写sql语句查询课程信息
    CourseWebVo getBaseCourseInfo(String courseId);


}
